<template>
  <div>
    <el-cascader
      v-model="value"
      :options="options"
      @change="handleChange"
    />
  </div>
</template>

<script>
import { regionDataPlus, CodeToText } from 'element-china-area-data'
export default {
  data() {
    return {
      options: regionDataPlus,
      value: []
    }
  },
  methods: {
    handleChange(val) {
      const arr = []
      for (const i in val) {
        arr.push(CodeToText[val[i]])
      }
      this.$emit('chinaAreaData', arr)
    }
  }
}
</script>

<style lang="sass" scoped>

</style>
